#include <iostream>
#include <cmath>

long long n, m;

int main()
{
    int T; std::cin >> T;
    while (T--) {
        std::cin >> n >> m;
        if ((n - m + 2) <= int(std::ceil(n/3.0) + 0.5))
            std::cout << "No\n";
        else
            std::cout << "Yes\n";
    }
}

